<template>
	<view class="cc-loadmore" v-if="count >= showLimit || loading">
		<u-loadmore marginTop="40rpx" marginBottom="40rpx" line :status="loadmore" />
	</view>
</template>

<script>
export default {
	computed: {
		loadmore() {
			// loading / nomore / loadmore
			return this.loading ? 'loading' : this.current === this.count ? 'nomore' : 'loadmore';
		}
	},
	props: {
		loading: {
			type: Boolean,
			default: false
		},
		current: Number,
		count: Number,
		showLimit: {
			type: [Number, String],
			default: 6
		}
	}
};
</script>
<style lang="scss" scoped>
.cc-loadmore {
	width: 100%;
	padding-bottom: 44rpx;
}
</style>
